From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 14 Sep 2005 16:49:23 +0000 (+0000) Subject: During my attempts to get the latest bridge networking model working on my X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16806^2~10^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7d4d9ab1dda0e0c71ffc55b65f289d652fe0c8bf;p=xen.git During my attempts to get the latest bridge networking model working on my system, I often invoked 'network-bridge stop' with total failure. Attached is an updated version that works. Signed-off-by: Andrew Theurer --- diff --git a/tools/examples/network-bridge b/tools/examples/network-bridge index 24b3ae3a12..342a2def9d 100755 --- a/tools/examples/network-bridge +++ b/tools/examples/network-bridge @@ -222,27 +222,31 @@ op_stop () { return fi - brctl delif ${bridge} ${netdev} + if ifconfig peth0 2>/dev/null | grep -q peth0 ; then - if ifconfig veth0 2>/dev/null | grep -q veth0 ; then - brctl delif ${bridge} vif0.0 ifconfig vif0.0 down - mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` - ifconfig ${netdev} down - ifconfig ${netdev} hw ether ${mac} - ifconfig ${netdev} arp up - transfer_addrs veth0 ${netdev} - transfer_routes veth0 ${netdev} - del_addrs veth0 - ifconfig veth0 -arp down - ifconfig veth0 hw ether 00:00:00:00:00:00 + mac=`ifconfig eth0 | grep HWadd | \ + sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` + ifconfig ${netdev} 0.0.0.0 down + ifconfig ${netdev} hw ether fe:ff:ff:ff:ff:ff + + ifconfig p${netdev} down + ifconfig p${netdev} hw ether ${mac} arp + brctl delif ${bridge} p${netdev} + + ip link set eth0 name veth0 + ip link set peth0 name eth0 + ifconfig ${bridge} down + brctl delbr ${bridge} + ifup eth0 + else transfer_routes ${bridge} ${netdev} fi } case ${OP} in - start) + start) op_start ;;